home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / misc / gms_dev.lha / GMSDev / Includes / desktop / desktop.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-29  |  6.2 KB  |  194 lines

  1. #ifndef DESKTOP_DESKTOP_H
  2. #define DESKTOP_DESKTOP_H TRUE
  3.  
  4. /*
  5. **  $VER: desktop.h
  6. **
  7. **  Desktop Definitions.
  8. **
  9. **  (C) Copyright 1996-1998 DreamWorld Productions.
  10. **      All Rights Reserved.
  11. */
  12.  
  13. #ifndef DPKERNEL_H
  14. #include <dpkernel/dpkernel.h>
  15. #endif
  16.  
  17. /***************************************************************************
  18. ** Desktop object.
  19. */
  20.  
  21. #define TAGS_DESKTOP ((ID_SPCTAGS<<16)|ID_DESKTOP)
  22. #define VER_DESKTOP  1
  23.  
  24. typedef struct Desktop {
  25.   struct Head    Head;       /* 00 [--] Standard header structure */
  26.   struct MenuBar *MenuBar;   /* 12 [--] Only 1 menu bar is allowed */
  27.   struct Bob     *Pointer;   /* 16 [--] The pointer for this desktop */
  28.   struct GScreen *Screen;    /* 20 [--] The Screen that is owned by the Desktop */
  29.   struct Chain   *Icons;     /* 24 [--] First icon on the chain */
  30.   struct Chain   *Windows;   /* 28 [--] First window on the chain */
  31.   struct Chain   *Children;  /* 32 [--] All the other children inside the desktop */
  32.   LONG   Gadgets;            /* 36 [--] Gadget flags */
  33.   struct Bob     *Wallpaper; /* 40 [--] Bob to use as wall paper */
  34.   LONG   Flags;              /* 44 [--] */
  35.   struct TitleBar *TitleBar; /* 48 [--] Pointer to a titlebar */
  36.  
  37.   /*** Private fields ***/
  38.  
  39.   struct Bob *prvPointer;
  40.   struct Bob *prvWallpaper;
  41. } OBJDesktop;
  42.  
  43. #define DSA_MenuBar   (TAPTR|12)
  44. #define DSA_Pointer   (TAPTR|16)
  45. #define DSA_Gadgets   (TLONG|36)
  46. #define DSA_Wallpaper (TAPTR|40)
  47. #define DSA_Flags     (TLONG|44)
  48. #define DSA_TitleBar  (TAPTR|48)
  49.  
  50. #define DSA_MenuBarTags   (TSTEPIN|TTRIGGER|12)
  51. #define DSA_PointerTags   (TSTEPIN|TTRIGGER|16)
  52. #define DSA_GadgetsTags   (TSTEPIN|TTRIGGER|36)
  53. #define DSA_WallpaperTags (TSTEPIN|TTRIGGER|40)
  54. #define DSA_TitleBarTags  (TSTEPIN|TTRIGGER|48)
  55.  
  56. /***************************************************************************
  57. ** Flags for Desktop->Gadgets
  58. */
  59.  
  60. #define GDF_CLOSE 0x00000001
  61. #define GDF_FLIP  0x00000002
  62.  
  63. /***************************************************************************
  64. ** Flags for Desktop->Flags
  65. */
  66.  
  67. #define DSF_Tile 0x00000001
  68.  
  69. /***************************************************************************
  70. ** This is the Chain object.  The advantage of an object chain is that
  71. ** it allows you to link up lots of objects that don't know anything about
  72. ** chaining.
  73. */
  74.  
  75. #define VER_CHAIN  1
  76. #define TAGS_CHAIN ((ID_SPCTAGS<<16)|ID_CHAIN)
  77.  
  78. typedef struct Chain {
  79.   struct Head  *Stats;     /* 00 Standard header */
  80.   struct Chain *Next;      /* 12 Next chain object */
  81.   struct Chain *Prev;      /* 16 Previous chain object */
  82.   APTR Object;             /* 20 Pointer to the object belonging to this node */
  83. } OBJChain;
  84.  
  85. #define CNA_Next   (TAPTR|12)
  86. #define CNA_Prev   (TAPTR|16)
  87. #define CNA_Object (TAPTR|20)
  88.  
  89. /***************************************************************************
  90. ** These are Window gadgets, the Window class holds pointers to them
  91. ** privately.  Since they are standard DPK objects, you can enhance them,
  92. ** add animations to gadgets etc...
  93. */
  94.  
  95. struct GadClose {
  96.   struct Head Head;    /* Standard header structure */
  97.   struct Bob  *Image;  /* Gadget Image (Bob) */
  98. };
  99.  
  100. struct GadIconify {
  101.   struct Head *Stats;  /* Standard header structure */
  102.   struct Bob *Image;   /* Gadget Image (Bob) */
  103. };
  104.  
  105.  
  106. struct GadMaximise {
  107.   struct Head *Stats;  /* Standard header structure */
  108.   struct Bob *Image;   /* Gadget Image (Bob) */
  109. };
  110.  
  111. struct GadResize {
  112.   struct Head *Stats;  /* Standard header structure */
  113.   struct Bob *Image;   /* Gadget Image (Bob) */
  114. };
  115.  
  116. /***************************************************************************
  117. ** Icon Object.
  118. **
  119. ** Most visual information, such as the coordinates, image data etc are
  120. ** inherited from the Bob and the text comes from the Font obejct.
  121. */
  122.  
  123. #define TAGS_ICON ((ID_SPCTAGS<<16)|ID_ICON)
  124. #define VER_ICON  1
  125.  
  126. typedef struct Icon {
  127.   struct Head Head;   /* [00] Standard header structure */
  128.   struct Bob  *Bob;   /* [12] The drawable part of the icon */
  129.   struct Font *Font;  /* [16] What font should we use to print the name [O] */
  130.   BYTE   *Name;       /* [20] The name to appear under the image */
  131.  
  132.   /*** Private fields ***/
  133.  
  134.   LONG   prvAFlags;
  135.   struct Bob  *prvBob;
  136.   struct Font *prvFont;
  137. } OBJIcon;
  138.  
  139. #define ICA_Bob  (TAPTR|12)
  140. #define ICA_Font (TAPTR|16)
  141. #define ICA_Name (TAPTR|20)
  142.  
  143. #define ICA_BobTags  (TAPTR|TTRIGGER|12)
  144. #define ICA_FontTags (TAPTR|TTRIGGER|16)
  145.  
  146. /***************************************************************************
  147. ** TitleBar Object.
  148. */
  149.  
  150. #define TAGS_TITLEBAR ((ID_SPCTAGS<<16)|ID_TITLEBAR)
  151. #define VER_TITLEBAR  1
  152.  
  153. typedef struct TitleBar {
  154.   struct Head Head;             /* [00 R-] Standard header structure */
  155.   struct Font   *Font;          /* [12 RI] Font to use for the title */
  156.   struct Bob    *Tile;          /* [16 RI] The Bob that is being used for tiling */
  157.   struct Bitmap *prvDestBitmap; /* [20 --] Private. */
  158.   BYTE   *Name;                 /* [24 RI] Name/Caption of the titlebar */
  159.   APTR   Parent;                /* [28 RI] Who owns the title bar */
  160.   LONG   BackColour;            /* [32 RW] RGB background colour */
  161.   LONG   HighColour;            /* [36 RW] RGB highlight colour */
  162.   LONG   DarkColour;            /* [40 RW] RGB dark colour */
  163.   struct Font *prvFont;         /* [44 --] Private */
  164.   WORD   LeftMargin;            /* [48 RW] X offset from the parent X/Y */
  165.   WORD   TopMargin;             /* [50 RW] Y offset from the parent X/Y */
  166.   WORD   Height;                /* [52 RW] Height of this titlebar */
  167.   WORD   Alignment;             /* [54 RW] Align to left, center or right */
  168.   WORD   RightMargin;           /* [56 RW] Pixel space to leave on the right */
  169.   WORD   emp;                   /* [58 --] */
  170.   struct Bob *prvTile;          /* [60 --] Private */
  171. } OBJTitleBar;
  172.  
  173. #define ALIGN_LEFT   1
  174. #define ALIGN_RIGHT  2
  175. #define ALIGN_CENTER 3
  176.  
  177. #define TBA_Font        (TAPTR|12)
  178. #define TBA_Tile        (TAPTR|16)
  179. #define TBA_Name        (TBYTE|24)
  180. #define TBA_Parent      (TAPTR|28)
  181. #define TBA_BackColour  (TLONG|32)
  182. #define TBA_HighColour  (TLONG|36)
  183. #define TBA_DarkColour  (TLONG|40)
  184. #define TBA_LeftMargin  (TWORD|48)
  185. #define TBA_TopMargin   (TWORD|50)
  186. #define TBA_Height      (TWORD|52)
  187. #define TBA_Alignment   (TWORD|54)
  188. #define TBA_RightMargin (TWORD|56)
  189.  
  190. #define TBA_FontTags    (TSTEPIN|TTRIGGER|12)
  191. #define TBA_TileTags    (TSTEPIN|TTRIGGER|16)
  192.  
  193. #endif /* DESKTOP_DESKTOP_H */
  194.